package com.dzu.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dzu.common.utils.PageUtils;
import com.dzu.gulimall.product.entity.CategoryEntity;
import com.dzu.gulimall.product.vo.Catelog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author zhaodong
 * @email zhaodong@qq.com
 * @date 2021-04-11 20:58:01
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void removeMenuByIds(List<Long> asList);

    /**
     * 找到 catalogId的完整路径和：
     * 【父、子、孙】
     * @param catalogId
     * @return
     */
    Long[] findCatalogPath(Long catalogId);

    /**
     * 级联更新所有关联的数据
     * @param category
     */
    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevle1Categorys();

    Map<String, List<Catelog2Vo>> getCatelogJson();

}

